#include<iostream>
#include<string>
using namespace std;
string s1, s2;
int main()
{
	while (cin >> s1 >> s2) {
		if (s1[0] >= '0' && s1[0] <= '9' && s2[0] == '-') {
			cout << "Bigger" << endl;
			continue;
		}
		if (s1[0] == '-' && s2[0] >= '0' && s2[0] <= '9') {
			cout << "Smaller" << endl;
			continue;
		}
		bool flag = 0;
		string t1 = s1, t2 = s2;
		if (s1[0] == '-') {
			flag = 1;
			t1 = s1.substr(1);
			t2 = s2.substr(1);
		}
		int idx1 = t1.find('.');
		int idx2 = t2.find('.');
		bool f1 = 0, f2 = 0;
		if (idx1 == idx2) {
			int n = t1.size(), m = t2.size();
			int ma = max(n, m);
			bool f3 = 0;
			//56556.56
			//12322.22244
			for (int i = 0; i < ma; i++) {
				if (i >= n)t1[i] = '0';
				if (i >= m)t2[i] = '0';
				if (t1[i] != t2[i]) {
					if (t1[i] - '0' > t2[i] - '0') {
						f1 = 1;
						f3 = 1;
						break;
					}
					else {
						f2 = 1;
						f3 = 1;
						break;
					}
				}
			}
			if (!f3) {
				cout << "Same" << endl;
				continue;
			}
			if (f1) {
				if (!flag)cout << "Bigger" << endl;
				else cout << "Smaller" << endl;
			}
			else {
				if (!flag)cout << "Smaller" << endl;
				else cout << "Bigger" << endl;
			}
			continue;
		}
		else if (idx1 > idx2) {
			if (flag) f2 = 1;
			else f1 = 1;
		}
		else {
			if (flag) f1 = 1;
			else f2 = 1;
		}
		if (f1) {
			cout << "Bigger" << endl;
		}
		else {
			cout << "Smaller" << endl;
		}
	}
	return 0;
}